﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Reflection;
using VMExplorer.Forms;

namespace VMExplorer
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      if(Environment.OSVersion.Version.Major != 5 || Environment.OSVersion.Version.Minor != 1 || IntPtr.Size != 4)
      {
        AssemblyName asmName = Assembly.GetExecutingAssembly ().GetName ();
        MessageBox.Show (
          "VMexplorer was developped and tested on Windows XP Professional 32 bits.\n" + 
          "The code relies on undocumented Windows API and data structures that are subject to change from version to versions.\n" +
          "\n" +
          "It may crash or report wrong information on your configuration.",
          String.Format ("{0} {1}.{2}", asmName.Name, asmName.Version.Major, asmName.Version.Minor),
          MessageBoxButtons.OK,
          MessageBoxIcon.Warning);
      }

      Application.Run(new MainForm());
    }
  }
}
